package com.example.bysj.domain;

import com.example.bysj.domain.authority.Actor;
import com.example.bysj.domain.authority.Role;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collection;

@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class User implements Comparable<User>, Serializable {
	private Integer id;
	private String username;
	private String password;
	private LocalDateTime loginTime;
	private Actor actor;
	private Collection<Role> roles;
	@Override
	public int compareTo(User o) {
		// TODO Auto-generated method stub
		return this.id-o.id;
	}

}
